package com.ruoyi.erp.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.erp.mapper.LedyUserClientMapper;
import com.ruoyi.erp.domain.LedyUserClient;
import com.ruoyi.erp.service.ILedyUserClientService;

/**
 * 案件当事人Service业务层处理
 * 
 * @author ztj
 * @date 2023-04-04
 */
@Service
public class LedyUserClientServiceImpl implements ILedyUserClientService 
{
    @Autowired
    private LedyUserClientMapper ledyUserClientMapper;

    /**
     * 查询案件当事人
     * 
     * @param id 案件当事人主键
     * @return 案件当事人
     */
    @Override
    public LedyUserClient selectLedyUserClientById(Long id)
    {
        return ledyUserClientMapper.selectLedyUserClientById(id);
    }

    /**
     * 查询案件当事人列表
     * 
     * @param ledyUserClient 案件当事人
     * @return 案件当事人
     */
    @Override
    public List<LedyUserClient> selectLedyUserClientList(LedyUserClient ledyUserClient)
    {
        return ledyUserClientMapper.selectLedyUserClientList(ledyUserClient);
    }

    /**
     * 新增案件当事人
     * 
     * @param ledyUserClient 案件当事人
     * @return 结果
     */
    @Override
    public int insertLedyUserClient(LedyUserClient ledyUserClient)
    {
        ledyUserClient.setCreateTime(DateUtils.getNowDate());
        return ledyUserClientMapper.insertLedyUserClient(ledyUserClient);
    }

    /**
     * 修改案件当事人
     * 
     * @param ledyUserClient 案件当事人
     * @return 结果
     */
    @Override
    public int updateLedyUserClient(LedyUserClient ledyUserClient)
    {
        ledyUserClient.setUpdateTime(DateUtils.getNowDate());
        return ledyUserClientMapper.updateLedyUserClient(ledyUserClient);
    }

    /**
     * 批量删除案件当事人
     * 
     * @param ids 需要删除的案件当事人主键
     * @return 结果
     */
    @Override
    public int deleteLedyUserClientByIds(Long[] ids)
    {
        return ledyUserClientMapper.deleteLedyUserClientByIds(ids);
    }

    /**
     * 删除案件当事人信息
     * 
     * @param id 案件当事人主键
     * @return 结果
     */
    @Override
    public int deleteLedyUserClientById(Long id)
    {
        return ledyUserClientMapper.deleteLedyUserClientById(id);
    }
}
